package com.itheima.service01;

import com.itheima.domain.Student;
import com.itheima.mapper01.StudentMapper01;
import com.itheima.utils.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class TestDemo01 {
    @Test
    public void findAll(){
        SqlSession sqlSession = MyBatisUtils.getSqlSession();
        StudentMapper01 mapper = sqlSession.getMapper(StudentMapper01.class);
        List<Student> all = mapper.findAll();
        for (Student student : all) {
            System.out.println(student.getName());
        }

    }


}
